import request from '@/utils/request'



  //加入购物车
  export const cartAddApi = (userid:string,proid:string, num?: number)=>request.post('/cart/add',{userid,proid ,  num: num || 1})

  //获取购物车列表
  export const cartlistApi = (userid:string)=>request.post('/cart/list',{userid})

  //修改每一条的选中状态
  export const updateApi = (cartid:string , flag:boolean)=>request.post('/cart/selectone',{cartid,flag})

    //修改全部的选中状态
    export const updateAllApi = (userid:string , type:boolean)=>request.post('/cart/selectall',{userid,type})

  //删除单条数据
  export const cartremoveApi = (cartid:string)=>request.post('/cart/remove',{cartid})

